//
// Created by alexa on 5/2/2024.
//

#include "Launcher.h"

Launcher::Launcher(string name, int railsCount, float shotsDelay) :
        CombatUnit(name),
        railsCount(railsCount),
        missilesCount(0),
        shotsDelay(shotsDelay), aimX(1), aimY(1) {
}

int Launcher::getRailsCount() const {
    return railsCount;
}

float Launcher::getShotsDelay() const {
    return shotsDelay;
}

int Launcher::getMissilesCount() const {
    return missilesCount;
}

void Launcher::shoot() {
    if (missilesCount > 0) {
        missilesCount -= 1;
    }
}

float Launcher::getAimX() const {
    return aimX;
}

void Launcher::setAimX(float aimX) {
    this->aimX = aimX;
}

float Launcher::getAimY() const {
    return aimY;
}

void Launcher::setAimY(float aimY) {
    this->aimY = aimY;
}

void Launcher::setMissilesCount(int missilesCount) {
    this->missilesCount = missilesCount;
}
